package com.hujf.gameserver.service.impl;

import com.hujf.gameserver.service.UserService;
import com.hujf.gameserver.mapper.UserMapper;
import com.hujf.gameserver.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Hujf
 * @title: UserServiceImpl
 * @date 2021/2/15 0015下午 9:30
 * @description: TODO
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public int addUser(String username, String password) {
        User user = new User();
        user.setTime(0);
        user.setSex(0);
        user.setScore(0);
        user.setUserName(username);
        user.setPassWord(password);
        int k =userMapper.insert(user);
        return k;
    }
}
